import http from "@/http";
import {AddType,updateType } from "./ListModel";

// 获取待办事项
// export const getListApi = (parm: ListType) => {
//     return http.get("/api/content/getList",parm)
// }

// 获取待办事项
export const getListApi = (userId: number) => {
    return http.get(`/api/content/getList?userId=${userId}`)
}

// 新增
export const addApi = (parm: AddType) => {
    return http.post("/api/content/add", parm)
}

// 更新状态
export const updateApi = (parm: updateType) => {
    return http.put("/api/content/update", parm)
}



// 删除
export const deteleApi = (contentId: number) => {
    return http.delete(`/api/content/detele?contentId=${contentId}`)
}




// // 新增
// export const registerApi = (parm: ListType) => {
//     return http.post("http://localhost:8066/api/content/add", parm)
// }


//注册
// export const registerApi = (parm:RegisterParm)=>{
//     return http.post("/api/register",parm)
// }



// //获取菜单数据
// export const getMenuListApi = (parm:InfoParm)=>{
//     return http.get("/api/login/getMenuList",parm)
// }
// //获取用户信息
// export const getInfoApi = (parm:InfoParm)=>{
//     return http.get("/api/login/getInfo",parm)
// }